package task;

public class Task6_8 {
    public static boolean order(int[] array){
        for (int i = 0; i < array.length - 1; i++) {
            if(array[i] > array[i +1]){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        int[] array1 = {1,2,3,4,5,6};
        int[] array2 = {4,1,2,7,5};
        System.out.println(order(array1));
        System.out.println(order(array2));
    }
}
